home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 15: Shareware / PC Actual CDT 15.iso / files / Windows_95_98 / Programacion / Java / kinst351a.exe / data1.cab / plugin_samples / KawaPlugin4.java < prev    next >
Encoding:
Java Source  |  2000-02-17  |  811 b   |  33 lines

  1. import java.util.*;
  2. import com.tektools.kawa.plugin.*;
  3.  
  4. /** This enumerates each project in the Kawa project tree and opens each project after
  5.   *     s set amount of time
  6.   */
  7. public class KawaPlugin4
  8. {
  9.     public static void main(String[] args)
  10.     {
  11.         KawaApp.out.showWindow(true);
  12.         KawaApp.out.clearWindow();
  13.         Enumeration enum = KawaApp.enumerateProjects();
  14.         int count = 0;
  15.         while(enum.hasMoreElements() && count < 2)
  16.         {
  17.             KawaProject proj = (KawaProject)enum.nextElement();
  18.             if(proj != null && !proj.equals(KawaApp.getCurrentProject()))
  19.             {
  20.                 KawaProject openProj = KawaApp.openProject(proj.getPath(), false);
  21.                 KawaApp.out.println(openProj.getPath());
  22.                 count++;
  23.                 try
  24.                 {
  25.                     Thread.sleep(5000);
  26.                 }
  27.                 catch(InterruptedException e)
  28.                 {
  29.                 }
  30.             }
  31.         }
  32.     }
  33. }